/* Success & Error Pupup */

/* Shared Overlay */
.overlaymsg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.overlaymsg.active {
    display: flex;
}

.popup {
    background: white;
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    transform: scale(0.7);
    opacity: 0;
    animation: popupIn 0.4s ease-out forwards;
}

@keyframes popupIn {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ✅ Success Checkmark */
.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 6px solid #4CAF50;
    margin: 0 auto 20px;
    position: relative;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.9);
    }
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 16px;
    width: 18px;
    height: 34px;
    border: solid #4CAF50;
    border-width: 0 5px 5px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    animation: drawCheck 0.5s ease-out forwards 0.5s;
}

@keyframes drawCheck {
    to {
        transform: rotate(45deg) scale(1);
        opacity: 1;
    }
}

/* ❌ Error X */
.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 6px solid #f44336;
    margin: 0 auto 20px;
    position: relative;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(244, 67, 54, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(244, 67, 54, 0.9);
    }
}

.x-line {
    position: absolute;
    width: 40px;
    height: 6px;
    background-color: #f44336;
    border-radius: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.x-line1 {
    animation: drawLine1 0.4s ease-out forwards 0.3s;
}

.x-line2 {
    animation: drawLine2 0.4s ease-out forwards 0.5s;
}

@keyframes drawLine1 {
    0% {
        transform: translate(-50%, -50%) rotate(45deg) scale(0);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) rotate(45deg) scale(1);
        opacity: 1;
    }
}

@keyframes drawLine2 {
    0% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(0);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(1);
        opacity: 1;
    }
}

.popup h2 {
    font-size: 24px;
    margin: 10px 0;
}

.popup p {
    color: #666;
}

.popup button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    color: white;
    cursor: pointer;
}

.popup .btn-success {
    background-color: #4CAF50;
}

.popup .btn-error {
    background-color: #f44336;
}

.popup .btn-success:hover {
    background-color: #43a047;
}

.popup .btn-error:hover {
    background-color: #d32f2f;
}

/* Success & Error Pupup */